import request from '@/utils/request'

// 获取订单数量
export const getOrderCount = (params) => {
  return request.get('/api/order-service/report/orderCount', {
    params
  })
}

// 获取收入
export const getOrderAmount = (params) => {
  return request.get('/api/order-service/report/orderAmount', {
    params
  })
}

// 获取销售额统计
export const getAmountCollect = (type, start, end) => {
  return request.get(`/api/order-service/report/amountCollect/${type}/${start}/${end}`)
}

// 获取区域统计
export const getRegionCollect = (start, end) => {
  return request.get(`/api/order-service/report/regionCollect/${start}/${end}`)
}

// 获取排行榜
export const getSkuTop = (topValue, start, end) => {
  return request.get(`/api/order-service/report/skuTop/${topValue}/${start}/${end}`)
}

// 获取设备统计
export const getSkuCollect = (innerCode, start, end) => {
  return request.get(`/api/order-service/report/skuCollect/${innerCode}/${start}/${end}`)
}

// 搜索订单列表
export const searchOrderList = (params) => request.get('/api/order-service/order/search', { params })

// 获取时间范围内分成总数
export const getTotalBill = (params) => request.get('/api/order-service/report/totalBill', { params })

// 获取合作商分成汇总数据
export const getPartnerCollect = (params) => request.get('/api/order-service/report/partnerCollect', { params })

